<div>
    <li v-for = "node in nodes" :key="node.key">
        <el-menu-item v-if="node.isFile" :index="node.key" @click="openJointTemplate(node.path, node.name)">
            <template slot="title">
                <i class="el-icon-tickets"></i>
                <span>{{node.name}}</span>
            </template>
        </el-menu-item>
        <el-submenu v-else :index="node.key" @contextmenu.prevent="rightClick">
            <template slot="title">
                <i class="el-icon-folder"></i>
                <span>{{node.name}}</span>
            </template>
            <tree-Menu v-if="Array.isArray(node.children)" @openJointTemplate="openJointTemplate" :nodes="node.children"></tree-Menu>
        </el-submenu>
    </li>
    <div v-show="menuVisible">
        <ul id="menu" class="menu">
            <li class="menu__item">新增</li>
        </ul>
    </div>
</div>
</div>